<?php

/*
 * Niken Larasati
 * larasati.n@students.amikom.ac.id
 */

class kelahiran_c extends CI_Controller {

    public function __construct() {
        parent::__construct();
    }

    function formkelahiran() {
        $this->template->load('halaman', 'formkelahiran');
    }
    function simpan(){
        if($this->input->post('simpan') != NULL)
        {
            $data['id_lahir'] = $this->input->post('idlahir');
            $data['no_kk'] = $this->input->post('nokk');
            $data['nama_bayi'] = $this->input->post('namabayi');
            $data['jns_kel'] = $this->input->post('jk');
            $data['tmpt_dilahirkan'] = $this->input->post('tmp_dilahirkan');
            $data['tmpt_kelahiran'] = $this->input->post('tmp_lahir');
            $data['hari'] = $this->input->post('hari');
            $data['pukul'] = $this->input->post('pkl');
            $data['tgl_lahir'] = $this->input->post('tgl_lahir');
            $data['jns_kelahiran'] = $this->input->post('jns_lahir');
            $data['lahir_ke'] = $this->input->post('ke');
            $data['penolong'] = $this->input->post('penolong');
            $data['brt_bayi'] = $this->input->post('brt_bayi');
            $data['pnj_bayi'] = $this->input->post('pjg_bayi');
            $data['nik_ibu'] = $this->input->post('nik_ibu');
            $data['nik_ayah'] = $this->input->post('nik_ayah');
            $data['nik_saksi'] = $this->input->post('nik_saksi');
            $data['nik_pelapor'] = $this->input->post('nik_lapor');
            
            $this->load->model('umum');
            $this->umum->simpan('kelahiran',$data);
        }else {echo 'gagal';}
    }
}

?>
